# 安装必要软件
sudo apt-get install -y aptitude gdebi vim curl wget build-essential openssh-server python3-pip net-tools lrzsz

# python3 检查以及安装
python3 -V

# 配置python3 pip国内源
pip3 install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/
pip3 install --upgrade pip
pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/

# docker install
# step 1: 安装必要的一些系统工具
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
# step 2: 安装GPG证书
curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
# Step 3: 写入软件源信息
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
# Step 4: 更新并安装Docker-CE
sudo apt-get -y update
sudo apt-get -y install docker-ce
# docker config
sudo groupadd docker || true
sudo usermod -aG docker $USER || exit 0
sudo service docker restart
newgrp - docker
# install docker-compose
sudo pip3 install docker-compose

# echo version
echo "docker version and docker-compose version"
docker version
docker-compose version

# install git
sudo apt install git

# config git
sudo apt -install git
git config --global user.name "alan li"
git config --global user.email "macroldj@163.com"
git config --global color.diff.meta "blue black bold"
ssh-keygen -t rsa -C "macroldj@163.com"
